//
//  MVCollectionViewCell.m
//  23-QQ音乐
//
//  Created by dllo on 16/8/15.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MVCollectionViewCell.h"
#import "MVCollectionList.h"
#import "UIImageView+WebCache.h"

@interface MVCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageViewPic;
@property (weak, nonatomic) IBOutlet UILabel *songLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;


@end

@implementation MVCollectionViewCell

- (void)setMvList:(MVCollectionList *)mvList {
    
    _mvList = mvList;
    NSString *songAndSinger = [mvList.mvtitle stringByAppendingFormat:@" - %@", mvList.singername];
    _songLabel.text = songAndSinger;
//    self.songLabel.text = [NSString stringWithFormat:@"%@  %@", mvList.mvtitle, mvList.singer_name];
    self.descLabel.text = mvList.mvdesc;
    if (mvList.picurl.length != 0) {
        [self.imageViewPic sd_setImageWithURL:[NSURL URLWithString:mvList.picurl]];
    } else {
        NSString *imageUrl = [NSString stringWithFormat:@"http://shp.qpic.cn/qqvideo_ori/0/%@_360_204/0?max_age=259200", mvList.vid];
        [_imageViewPic sd_setImageWithURL:[NSURL URLWithString:imageUrl]];
    }
}

@end
